<!--
 * @Author: your name
 * @Date: 2020-11-02 14:18:57
 * @LastEditTime: 2020-12-24 11:35:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wms2\src\views\comprehensive\tasks\components\tasksAssign.vue
-->
<template>
  <div style="padding: 15px;">
    <el-form ref="form"  label-width="80px" >
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="员工" prop="userCode">
              <el-select v-model="userCode" placeholder="请选择所属员工" style="width:100%">
                <el-option
                  v-for="item in userData"
                  :key="item.code"
                  :label="`${item.name}(${item.code})`"
                  :value="item.code"
                />
              </el-select>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
    </el-form>
    <el-row
      class="root-form-bar-row"
      type="flex"
      justify="center"
      align="bottom"
    >
      <el-button
        type="primary"
        plain
        @click="handleClick"
        >确定</el-button
      >
    </el-row>

  </div>
</template>
<script>
import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/index.css'

import { tasksAssign} from '@/api/store'
export default {
  name: "differenceAudit",
  data() {
    return {
      userData:[],
      userCode:'',
      arr:[]
    };
  },

  created() {
  },
  methods: {
    // 重置
    reset(){
      this.userCode = ''
    },

    //提交
    handleClick(){
      tasksAssign(this.arr,this.userCode).then(response => {
        this.$message({ message: response.msg, type: 'success' })
        this.$emit('fatherAudit')
      }).catch(() => {
        this.$emit('fatherAudit')
      })
    },


  },
};
</script>

<style>
.vxe-table .vxe-body--column:not(.col--ellipsis),
.vxe-table .vxe-footer--column:not(.col--ellipsis),
.vxe-table .vxe-header--column:not(.col--ellipsis) {
  padding: 6px 0;
}
.vxe-toolbar {
  padding: 0 0 10px 0;
}
</style>
